﻿using System;
using System.Web.UI;
using Mobile.Web.DataAccess;
using RadioButtonList = Mobile.WebControls.Field.RadioButtonList;

namespace Mobile.Web.Form
{
    public partial class RadioButtonPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            Control control = ControlHelper.GetControlById(mbPage1, "rbCars");
            Control control2 = ControlHelper.GetControlById(mbPage1, "rbCars2");
            if ((control is RadioButtonList) && (control2 is RadioButtonList))
            {
                RadioButtonList rb = control as RadioButtonList;
                RadioButtonList rb2 = control2 as RadioButtonList;
                rb.DataSource = CarDataAccess.GetCars();
                rb2.DataSource = CarDataAccess.GetCars();
                rb.DataBind();
                rb2.DataBind();
            }
        }
    }
}